Skip to content

Adding string parsing to Weekday.#5

Open
LennartCode wants to merge 1 commit intopcekm:mainfrom
LennartCode:main
Open

Adding string parsing to Weekday.#5
LennartCode wants to merge 1 commit intopcekm:mainfrom
LennartCode:main

Conversation

@LennartCode
Copy link
Copy Markdown

This closes #4 as two-letter representations are not planned.

Copy link
Copy Markdown
Owner

@pcekm pcekm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution. Your implementation looks fine to me. Please add a couple of simple unit tests (one success, one failure), and update CHANGELOG.md (under a section called "[unreleased]").

Comment on lines +29 to +31
/// Parses a string to a weekday.
///
/// Takes a lower-case weekday name in English and returns the respective enumerated value.
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets focus more on the idea that this is the inverse of the name field. The fact that it's english isn't all that important. Something like "Parses the output of [name]." You could probably get away with just that single line and no other explanation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add weekday parsing and two-letter weekday shorthands

2 participants